package com.slz3.business.module.memberManagement.memJifen.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memJifen.domain.MemJifen;
import com.slz3.business.module.memberManagement.memJifen.domain.MemJifenCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemJifenResAtomic {

    static Mono<ServerResponse> add_$MemJifenUpdateLock(ServerRequest req, MemJifen memJifen) {
        return MemJifenResSafeValid.add(req, memJifen) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.add(req, memJifen);
    }

    public static Mono<ServerResponse> delete_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.delete(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$MemJifenUpdateLock(ServerRequest req, MemJifen memJifen) {
        return MemJifenResSafeValid.modify(req, memJifen) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.modify(req, memJifen);
    }

    static Mono<ServerResponse> info_$MemJifenUpdateLock(ServerRequest req) {
        return MemJifenResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.auditSubmit(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.audit(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.auditReject(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.usingEnable(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$MemJifenUpdateLock(ServerRequest req, MemJifenCondition memJifenCondition) {
        return MemJifenResSafeValid.usingDisable(req, memJifenCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemJifenResExecutor.usingDisable(req);
    }
}
